1name: Test
2
3on:
4 pull_request:
5 push:
6 branches:
7 - main
8 workflow_dispatch:
9
10jobs:
11 Test:
12 name: pre-commit
13 runs-on: ubuntu-latest
14 steps:
15 - name: 💾 Check out repository
16 uses: actions/checkout@v3
17
18 - name: 🪝 Cache pre-commit hooks
19 uses: actions/cache@v3
20 with:
21 path: ~/.cache/pre-commit
22 key: "pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml')
23 }}"
24
25 - name: ✨ Install pre-commit
26 shell: bash
27 run: python3 -m pip install pre-commit
28
29 - name: 🔥 Test
30 run: pre-commit run --show-diff-on-failure --all-files
31
32concurrency:
33 group: ${{ github.workflow }}-${{ github.ref }}
34 cancel-in-progress: false